    /********************************************************/
    /*                                                      */
    /*                                                      */
    /*         Copyright (C), 1993  SEIKO EPSON Corp.       */
    /*         ALL RIGHTS RESERVED                          */
    /*                                                      */
    /*                                                      */
    /*  file name : puts.c                                  */
    /*                                                      */
    /*  Revision history                                    */
    /*      93/12/17    first release       S.Akaiwa        */
    /*                                                      */
    /*                                                      */
    /********************************************************/

#ifdef  UNIX
#include    "stdio.h"
#else
#include    <stdio.h>
#endif

int
puts(const char * sStrP)

    /********************************************************/
    /*                                                      */
    /*  The puts function writes a string to standard       */
    /*  output stream.                                      */
    /*  '\n' character is written after the last character. */
    /*                                                      */
    /*      RETURN  0           ... Success                 */
    /*              EOF         ... Error                   */
    /*                                                      */
    /*  <ANSI>                                              */
    /*      The puts function writes string to standard     */
    /*      output stream.                                  */
    /*                                                      */
    /*      RETURN  Integer     ... Success                 */
    /*              EOF         ... Error                   */
    /*                                                      */
    /********************************************************/

    /* conat char    *sStrP  ;     pointer to output string */
    {
     
     int    iOfst;                /* write offset in buffer */
    
     iOfst = 0;                       /* clear write offset */

     while(sStrP[iOfst] != '\0'){  /* until null terminator */
        if(putc((int)sStrP[iOfst], stdout) == EOF){
           return   (int)EOF;                /* write error */
        }
        
        iOfst++;
     }
                                   /* output '\n' character */
     if(putc((int)'\n', stdout) == EOF){
        return  (int)EOF;                    /* write error */
     }

     return (int)0;                              /* success */
    }

